package com.it.text;

//汽车类
public class Car {
    String brand;//品牌
    String colour;//颜色
    double price;//价格

    //无参构造
    public Car() {
    }

    //全参构造
    public Car(String brand, String colour, double price) {
        this.brand = brand;
        this.colour = colour;
        this.price = price;
    }


    void start() {
        System.out.println(brand + "品牌" + colour + "颜色" + price + "块钱的车启动了...");
    }

    void run() {
        System.out.println(brand + "品牌" + colour + "颜色" + price + "块钱的车开始跑了...");
    }

    void stop() {
        System.out.println(brand + "品牌" + colour + "颜色" + price + "块钱的车停止了...");
    }
}
